//
//  GETableViewCell.h
//  ERP
//
//  Created by goldeney on 15/3/12.
//  Copyright (c) 2015年 ShangHai Goldeneye Techonology Co.,Ltd. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ServiceConnect.h"
#import "WebServiceCommonRequest.h"

@interface GEInputTableViewCell : UITableViewCell

@property (nonatomic,strong) id objectData;
@property (nonatomic,strong) id tagData;

@property (nonatomic,strong,readwrite) NSString *titleName; //标题
@property (nonatomic,strong,readwrite) NSString *placeholder; //输入框注释
@property (nonatomic,strong,readwrite) NSString *inputFiled; //输入框值

@property (nonatomic,assign) BOOL isChangeWidth; //是否改变宽度
@property (nonatomic,assign) BOOL isMark; //是否显示标记
@property (nonatomic,assign) BOOL isEdit; //可以调用编辑
@property (nonatomic,assign) BOOL isDirectEdit; //直接编辑输入框

@property (nonatomic,assign) CGFloat fieldWidthOffset; //输入框偏移量
@property (nonatomic,assign) CGFloat activityWidthOffset;

//输入框过滤方法
typedef __block BOOL (^textFieldFilter)(UITextField *textField, NSRange range, NSString *string);
@property (nonatomic, strong) textFieldFilter textFieldFilter;


#pragma mark - OA模块调用

//普通输入框
- (id)initWithReuseIdentifier:(NSString *)reuseIdentifier model:(ServiceParametModel*)model;

//输入框带选择
- (id)initWithInputSelectReuseIdentifier:(NSString *)reuseIdentifier model:(ServiceParametModel*)model;

//单选
- (id)initWithSwitchReuseIdentifier:(NSString *)reuseIdentifier target:(id)target switchs:(SEL)switchAction;

//选择输入框
- (id)initWithSelectReuseIdentifier:(NSString *)reuseIdentifier model:(ServiceParametModel*)model;
- (void)setPickerTextFieldComponents:(NSArray*)array keyValue:(NSArray*)keyValue;

//多个选择输入框
- (id)initWithSelectMultiReuseIdentifier:(NSString *)reuseIdentifier;

//时间对话框
- (id)initWithDateReuseIdentifier:(NSString *)reuseIdentifier;

//普通单选框
- (id)initWithSwitchIdentifier:(NSString *)reuseIdentifier model:(ServiceParametModel*)model;


//设置键盘类型及输入过滤规则
- (void)setKeyboardType:(UIKeyboardType)keyboardType filter:(NSString*)filter block:(textFieldFilter)block;

//多输入框
- (id)initWithFieldMultiIdentifier:(NSString *)reuseIdentifier type:(NSString*)typeString;

//设置输入文字长度
- (void)setInputFiledLimitLength:(NSInteger)length;

//设置多输入框的值
- (void)setMultiTextFieldValue:(NSArray<NSString*>*)array;

//获取多输入框的值
- (NSString*)getMultiTextFieldValue;

//获取多输入框是否输入值
- (BOOL)isMultiTextFieldInputValue;

//重新加载
- (void)reloadData;

//输入框事件
- (void)addDoneTarget:(id)target action:(SEL)action;

- (void)setDatePickerMode:(UIDatePickerMode)pickerModel;

- (void)setKeyboardType:(UIKeyboardType)keyboardType filter:(NSString*)filter;

- (void)setDefaultDateField:(NSDate*)date;

- (void)setDatePickerMode:(UIDatePickerMode)pickerModel defaultDate:(NSDate*)date;

- (void)setMultiComponents:(NSArray*)array;

- (void)setEnablePrevious:(BOOL)isPreviousEnabled next:(BOOL)isNextEnabled;

- (void)addEditSelectFieldTarget:(id)target action:(SEL)action;

//重新获取数据
- (void)againGetServiceParamet:(NSDictionary*)model;

//重新获取公共接口数据
- (void)againGetWebServiceCommonRequest:(WebServiceCommonRequest*)model;

#pragma mark - ERP模块调用

//选择输入框
- (id)initWithSelectReuseIdentifier:(NSString *)reuseIdentifier request:(WebServiceCommonRequest*)model;

@end
